package com.gitee.feizns.explore.data_structure.tree.cus.bt;

/**
 * @author feizns
 * @since 2019/12/16
 */
public class Test {

    public static void main(String[] args) {
        Btree<Integer, String> btree = new Btree<>();
        btree.put(1, "1");
        btree.put(2, "2");
        btree.put(3, "3");
        btree.put(4, "4");
        btree.put(5, "5");
        btree.put(6, "6");
        btree.put(7, "7");
        btree.put(8, "8");
        btree.put(9, "9");
        btree.put(10, "10");
        btree.put(11, "11");

        btree.printTree();

        System.out.println();
        System.out.println();

        btree.remove(2);

        btree.printTree();

        System.out.println();
        System.out.println();

        btree.remove(11);

        btree.printTree();

        System.out.println();
        System.out.println();

        btree.remove(10);

        btree.printTree();

        System.out.println();

        btree.remove(1);

        btree.printTree();

        System.out.println(btree.keySet());

//        btree.recursiveMiddleEach((k, v) -> System.out.println(k));
    }


}
